/**
 * Created with JetBrains WebStorm. User: rekey Date: 7/9/13 Time: 21:13 To
 * change this template use File | Settings | File Templates.
 */
var mongoose = require('mongoose');
var schemas = require('../schemas/index.js');
var _exports = {};
var id = require('./id.js');
Object.keys(schemas).forEach(function(name) {
    var schema = schemas[name];
    // 为ObjectId类型是Number实现递增
    if (schema.paths._id && schema.paths._id.instance == 'Number') {
        id.setPre(name, schema);
    }
    _exports[name] = require('./' + name + '.js');
});
console.log('Dao load success.');
module.exports = _exports;